package ooday05.practise;

public class StaticVarTest {
    public static void main(String[] args) {
        //静态成员会被类的所有对象共享
        //静态成员随类的加载而加载,优先对象被创建
        //访问静态成员通过类名访问
        StaticVar staticVar=new StaticVar();
        staticVar.show();
        StaticVar staticVar1=new StaticVar();
        staticVar1.show();
        StaticVar staticVar2=new StaticVar();
        staticVar2.show();
    }
}
